<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-row>
      <el-col :span='22' :xs='24'>
        <el-form ref="form" :model="s_access" :rules="rules" label-width="100px" id="mvcfm">
          <el-button @click="gotoPage('/oa/humanresources/StaffUp?'+vueparams+'')" type='success' size="mini"><i class='fa fa-edit'></i>修改</el-button>
          <el-button @click="gotoPage('/oa/humanresources/StaffList?'+vueparams+'')" type='primary' size="mini"><i class='fa fa-reply'></i>返回</el-button>
          <div class="form-unit">
            <span class="mvc-title-left"> 员工基本信息 </span>
          </div>
          <div>
            <el-row>
              <el-col :span="12">
                <el-form-item label="岗位" prop="">
                  {{s_access.role}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="姓名" prop="">
                  {{s_access.person_name}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="上级领导" prop="">
                  {{s_access.user_parent_name}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="性别" prop="">
                  {{s_access.person_sex}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="民族" prop="">
                  {{s_access.person_ethnic}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="政治面貌" prop="">
                  {{s_access.person_politics1}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="出生年月" prop="">
                  {{s_access.person_birthday}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="证件类别" prop="">
                  {{s_access.person_papercate1}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="证件号码" prop="">
                  {{s_access.person_paperno}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="300">
                <el-form-item label="证件照片" prop="">
                  <img src='images/icons/talent/nopic.jpg' width='300' height='200' />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="学位学历" prop="">
                  {{s_access.person_education}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="学位专业" prop="">
                  {{s_access.person_professional}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="300">
                <el-form-item label="学位证书" prop="">
                  <img src='images/icons/talent/nopic.jpg' width='300' height='200' />
                </el-form-item>
              </el-col>
            </el-row>
          </div>
          <div class="form-unit">
            <span class="mvc-title-left"> 员工通讯信息 </span>
          </div>
          <div>
            <el-row>
              <el-col :span="12">
                <el-form-item label="手机" prop="">
                  {{s_relation.relation_cel}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="E-mail" prop="">
                  {{s_relation.relation_email}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="电话" prop="">
                  {{s_relation.relation_tel}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="QQ" prop="">
                  {{s_relation.QQ}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="邮编" prop="">
                  {{s_relation.relation_zip}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="传真" prop="">
                  {{s_relation.Fax}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="家庭实际住址" prop="">
                  {{s_relation.relation_address}}
                </el-form-item>
              </el-col>
            </el-row>
          </div>
          <el-button @click="gotoPage('/oa/humanresources/StaffUp?'+vueparams+'')" type='success' size="mini"><i class='fa fa-edit'></i>修改</el-button>
          <el-button @click="gotoPage('/oa/humanresources/StaffList?'+vueparams+'')" type='primary' size="mini"><i class='fa fa-reply'></i>返回</el-button>
        </el-form>
      </el-col>
      <el-col :span='2' :xs='24'>
        <el-menu default-active='active' class='menu-unit'>
          <el-menu-item v-for='item in Container'>
            <el-link @click="gotoMenu(item.url)" :type="'基本信息'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'StaffDet',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        s_access: {
          role: null,
          person_name: null,
          user_parent_name: null,
          person_sex: null,
          person_ethnic: null,
          person_politics1: null,
          person_birthday: null,
          person_papercate1: null,
          person_paperno: null,
          person_photo: null,
          person_education: null,
          person_professional: null,
          photo_education: null,
        },
        s_relation: {
          relation_cel: null,
          relation_email: null,
          relation_tel: null,
          QQ: null,
          relation_zip: null,
          Fax: null,
          relation_address: null,
        },
        loading: false,
        Container: null,
        rules: {}
      }
    },
    created() {
      this.getData();
      this.loadContainerMenu({
        pid: "507F29B70D824801B06B178B061EF810",
        name: "员工管理右菜单",
        selected: "基本信息"
      }, 'Container', this.vueparams);
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/oa/humanresources/EmployeeAction/staffDet?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
